With the improvement of the network technique, the streaming media service is developed rapidly. The users can access a wired or wireless network with a terminal device such as cell phone, computer, television, etc. to enjoy audio and video services. The bandwidth of the accessed network varies with the type of the accessed network, e.g., the GSM usually can only provide a bandwidth of several tens of Kb, while the WIFI can provide a bandwidth of several tens of Mb. Even in the same network, the bandwidth varies with the time, especially in the wireless network. The higher the network bandwidth is, the better the provided video quality is, so it is a problem for the streaming media service provider to provide the best video experience under a variable bandwidth.
Referring to FIG. 1, which illustrates an implementation solution of the prior art, in which, the code stream storage server stores the code streams of multiple code rates in each streaming media program, and each code stream is segmented into different slices at a fixed time interval (e.g., 2 s) to act as the basic unit of streaming media transmission, as illustrated in FIG. 2.
The streaming server in FIG. 1 is configured to detect the access bandwidth of the user terminal, and then select a code stream slice optimally matching the bandwidth of the user terminal from the code stream storage server to transmit to the user terminal. For example, the code stream storage server stores the pre-compressed code stream slices of 0.5 Mbps, 1 Mbps and 2 Mbps, wherein the code stream slice of 1 Mbps is transmitted when the access bandwidth of the user terminal is 1.8 Mbps, and the code stream slice of 2 Mbps is transmitted when the access bandwidth of the user terminal changes to 2.1 Mbps. The code rates are switched in a basic unit of slice, i.e., when the current code stream is slice 12 of code stream 1, if a bandwidth change is detected during the transmission of slice 12 and a switching to slice 23 of code stream 2 is required, the switching shall be made after slice 12 is ended.
During the implementation of the present invention, the inventor finds that the prior art at least has the following defect:
The streaming server can only select a code stream optimally matching the user terminal according to the bandwidth of the user terminal to transmit to the user terminal, thus there is the defect that the user bandwidth cannot be sufficiently utilized to provide a streaming media of the best quality. For example, when the user bandwidth is 1.8 Mbps, the streaming server can only select the code stream slice of 1 Mbps, thus the user bandwidth of 1.8 Mbps cannot be sufficiently utilized.